package com.muyu.user.service.impl;

import java.util.List;

import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.muyu.common.core.web.page.PageQueryModel;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.muyu.user.mapper.SysUserFriendMapper;
import com.muyu.user.domain.SysUserFriend;
import com.muyu.user.domain.model.SysUserFriendQueryModel;
import com.muyu.user.domain.model.SysUserFriendPageQueryModel;
import com.muyu.user.service.SysUserFriendService;

/**
 * 好友关系Service业务层处理
 *
 * @author liuguoqiang
 * @date 2025-09-18
 */
@Slf4j
@Service
public class SysUserFriendServiceImpl extends ServiceImpl<SysUserFriendMapper, SysUserFriend>  implements SysUserFriendService {

    /**
     * 查询好友关系列表
     *
     * @param pageQueryModel 好友关系
     * @return 好友关系
     */
    @Override
    public PageQueryModel<SysUserFriendPageQueryModel> pageQuery(SysUserFriendQueryModel pageQueryModel) {
        LambdaQueryWrapper<SysUserFriend> queryWrapper = new LambdaQueryWrapper<>();
             Page<SysUserFriend> page = this.page(pageQueryModel.buildPage(), queryWrapper);
        return PageQueryModel.of(page).cover(SysUserFriendPageQueryModel::infoBuild);
    }
}
